package com.example.cash.craft.dao.persist.repository.impl;

import com.example.cash.craft.dao.persist.mapper.OrderItemMapper;
import com.example.cash.craft.dao.persist.repository.IOrderItemRepository;
import com.example.cash.craft.pojo.entity.OrderItem;
import com.example.cash.craft.pojo.vo.OrderItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class OrderItemRepositoryImpl implements IOrderItemRepository {

    @Autowired
    private OrderItemMapper orderItemMapper;

    @Override
    public int insert(OrderItem orderItem) {
        return orderItemMapper.insert(orderItem);
    }

    @Override
    public List<OrderItemVO> listByOrderId(Long orderId) {
        return orderItemMapper.listByOrderId(orderId);
    }

}
